import service from '@/utils/request.js'
// 将所有的针对order的请求，都封装到一个对象中
const orderApi = {
    list(orderQuery) {
        return service.get('/order/list', {params: orderQuery})
    },
    deleteById(id) {
        return service.delete( `/order/deleteById/${id}`)
    },
    deleteAll(ids) {
        return service.delete( `/order/deleteAll/${ids}`)
    },
    selectById(id) {
        return service.get(`/order/selectById/${id}`)
    },
    update(order) {
        return service.put('/order/update', order)
    },
    selectOrderItemByOrderNo(orderNo) {
        return service.get(`/order/selectOrderItemByOrderNo/${orderNo}`)
    }
}

export default orderApi